home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / CUJ9203.ARJ / 1003020A < prev    next >
Text File  |  1992-06-02  |  380b  |  24 lines

  1.  
  2. /* convert infix notation to postfix notation */
  3.  
  4. #include <stdio.h>
  5.  
  6. main()
  7. {
  8.     char infix_str[200];
  9.     char postfix_str[200];
  10.     void intopost(const char *infix, char *postfix);
  11.  
  12.     while (1) {
  13.         printf("Enter infix: ");
  14.         if (gets(infix_str) == NULL)
  15.             break;
  16.  
  17.         intopost(infix_str, postfix_str);
  18.         printf("    postfix: %s\n", postfix_str);
  19.     }
  20.  
  21.     return 0;
  22. }
  23.  
  24.